package com.itgacl.magic4j.libcommon.component.license.service;

import com.itgacl.magic4j.libcommon.component.license.bean.LicenseInfo;
import com.itgacl.magic4j.libcommon.component.license.dto.LicenseCheckDTO;
import com.itgacl.magic4j.libcommon.component.license.dto.LicenseDTO;
import com.itgacl.magic4j.libcommon.component.license.vo.LicenseCheckResultVo;
import com.itgacl.magic4j.libcommon.component.license.vo.LicenseVo;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.Valid;

public interface LicenseService {

    /**
     * 解析License文件
     * @param file
     * @return
     */
    LicenseVo decode(MultipartFile file) throws Exception;

    /**
     * 创建license
     * @param licenseDTO
     * @return
     */
    LicenseInfo create(LicenseDTO licenseDTO) throws Exception;

    void validateLicense();

    int licenseCheck();

    LicenseCheckResultVo licenseCheck(LicenseCheckDTO licenseDTO);
}
